package com.yan.provider.controller;


import com.yan.provider.entity.Project;
import com.yan.provider.service.ProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 项目 前端控制器
 * </p>
 *
 * @author zwq
 * @since 2021-03-19
 */
@RestController
@RequestMapping("/project")
public class ProjectController {
    @Autowired
    private ProjectService projectService;
    @GetMapping("/save")
    @Transactional
    public String saveProject(){
        Project project = new Project();
        project.setProjectCode("1233");
        project.setProjectName("新增项目");
        boolean save = projectService.save(project);
        int a= 0;
        int b =1;
        int c=b/a;
        return "sss";
    }

    public static void main(String[] args) {
        int a= 0;
        int b =1;
        int c=b/a;
    }
}

